<template>
  <div class="feed-item">
    <!-- <van-image class="feed-item__img" :src="item.cover" /> -->
    <div class="feed-item__img">
      <img v-lazy="item.cover">
    </div>
    <div class="feed-item__content">
      <div class="feed-item__content__title">
        <span
          v-if="item.isHot"
          class="feed-item__content__title__hot"
        >HOT</span>
        <span>{{ item.name }}</span>
      </div>
      <div class="feed-item__content__price">
        <span class="feed-item__content__price__icon">￥</span>
        <span class="feed-item__content__price__num">{{ item.price }}</span>
        <span
          class="feed-item__content__price__peo"
        >{{ item.sales }} 万人+付款</span>
      </div>
      <div class="feed-item__content__bottom">
        <div class="feed-item__content__bottom__right">...</div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: 'FeedItem',
  props: {
    item: {
      type: Object,
      default: () => {}
    }
  },
  data() {
    return {}
  },
  methods: {}
}
</script>

<style lang="less">
.feed-item {
  margin-top: 14px;
  // width: 100%;
  overflow: hidden;
  border-radius: 12px;
  background: #ffffff;
  &__img {
    // width: auto;
    img {
      width: 100%;
    }
  }
  &__content {
    padding: 12px 2px 40px 21px;
    // background: #ffffff;
    &__title {
      // height: 84px;
      font-size: 30px;
      color: #0b0b0b;
      line-height: 34px;

      overflow: hidden;
      text-overflow: ellipsis;
      display: -webkit-box;
      -webkit-line-clamp: 2;
      -webkit-box-orient: vertical;
      &__hot {
        width: 56px;
        height: 28px;
        background: #fe6026;
        border-radius: 4px;
        font-size: 22px;
        color: #ffffff;
        line-height: 24px;
        font-weight: 200;
        text-align: center;
      }
    }

    &__price {
      height: 48px;
      margin-top: 24px;
      font-size: 34px;
      color: #ff540f;
      &__icon {
        height: 28px;
        font-size: 20px;
      }
      &__peo {
        margin-left: 13px;
        height: 30px;
        font-size: 22px;
        color: #9b9b9b;
      }
    }

    &__bottom {
      &__right {
        margin-right: 21px;
        // background: #c4d1c1;
        color: #c4d1c1;
        text-align: right;
      }
    }
  }
}
</style>
